package cz.semjob.document.annotation;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import cz.semjob.document.annotation.metadata.Entity;

public class EventAnnotation implements IAnnotation {
	
	private EntityAnnotation eventEntity;
	
	private final Map<String, IAnnotation> arguments;
	
	private final Entity type;
	
	
	public EventAnnotation(Entity type, EntityAnnotation eventEntity) {
		super();
		this.arguments= new HashMap<String, IAnnotation>();
		this.type = type;
		this.eventEntity=eventEntity;
	}

	public EntityAnnotation getEventEntity() {
		return eventEntity;
	}

	public void setEventEntity(EntityAnnotation eventEntity) {
		this.eventEntity = eventEntity;
	}

	public Map<String, IAnnotation> getArguments() {
		return arguments;
	}
	
	public void addArgument(String type, IAnnotation annotation) {
		arguments.put(type, annotation);
	}

	public Entity getType() {
		return type;
	}
	
	public String getText() {
		return eventEntity.getText();
	}

	public List<AnnotatedPart> getAnnotatedParts() {
		return eventEntity.getAnnotatedParts();
	}

	@Override
	public String toString() {
		return "EventAnnotation [type=" + type + ", text=" + getText() + "]";
	}
	
	

	
	

}
